package models;
import java.util.*;

import javax.persistence.*;


import play.data.validation.Max;
import play.data.validation.MaxSize;
import play.data.validation.Min;
import play.data.validation.Required;
import play.db.jpa.*;
 
@Entity
public class Condition_meteo extends Model
{
	@Required
	@Max(359)
	@Min(0)	
	public float direction_vent;
	
	@Required
	@Max(12)
	@Min(0)
	public float force_vent;
	
	public Date date_execution;
	
	public Condition_meteo(float direction_vent, float force_vent) {
		super();
		this.direction_vent = direction_vent;
		this.force_vent = force_vent;
		this.date_execution = new Date();
	}
	
	public Condition_meteo(float direction_vent, float force_vent, Date date) {
		super();
		this.direction_vent = direction_vent;
		this.force_vent = force_vent;
		this.date_execution = date;
	}	
	
	public String toString()
	{
		return "[Force " + Float.toString(force_vent) + "] [Direction "+ Float.toString(direction_vent) + "]";  
	}
		
}
